check_flag = 1
num = int(input("输入："))
cnt = 0
for i in range(64):
    if check_flag & num:
        cnt += 1
    check_flag = check_flag << 1
print(cnt)
